Hot fix: edits the trajectories to quantiles function #105
Hot fix: edits the trajectories to quantiles function #105kaitejohnson merged 2 commits intomainfrom
Conversation
…dle a missing chain of draws
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe R/utils.R file was modified to refactor the quantile calculation logic. The previous missing groups computation and anti-join step were removed, replaced with a direct NA filtering step and an added na.rm = TRUE parameter to the quantile function. Changes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
R/utils.R(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: test-coverage
- GitHub Check: macOS-latest (release)
- GitHub Check: ubuntu-latest (release)
- GitHub Check: windows-latest (release)
- GitHub Check: lint-changed-files
🔇 Additional comments (1)
R/utils.R (1)
89-89: Filter logic correctly handles row-level NAs.The filter step appropriately removes individual rows with NA values rather than excluding entire groups, which aligns with the PR objective to handle partial missingness within groups.
R/utils.R
Outdated
| probs = !!quantiles, | ||
| nam.rm = TRUE |
There was a problem hiding this comment.
Fix typo in parameter name.
Line 94 contains nam.rm = TRUE, but the correct parameter name for stats::quantile is na.rm, not nam.rm. This typo will cause the parameter to be unrecognised.
Apply this diff to correct the parameter name:
!!quantile_value_name := stats::quantile(
.data$value_col,
probs = !!quantiles,
- nam.rm = TRUE
+ na.rm = TRUE
),📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| probs = !!quantiles, | |
| nam.rm = TRUE | |
| probs = !!quantiles, | |
| na.rm = TRUE |
🤖 Prompt for AI Agents
In R/utils.R around lines 93 to 94, there is a typo in the quantile call: the
parameter is written as `nam.rm = TRUE` but the correct argument name is
`na.rm`. Replace `nam.rm` with `na.rm` so the `stats::quantile` call recognises
and applies the argument.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.